package cn.b.sky.mes.mm.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import cn.b.sky.mes.mm.model.Safetyinventroy;
import cn.b.sky.mes.mm.model.condition.SafetyinventroyCondition;

public interface SafetyinventroyDao {
  List<Safetyinventroy> selectSafetyinventroyByCondition(SafetyinventroyCondition condition);

  int selectSafetyinventroyCountByCondition(SafetyinventroyCondition condition);

  Safetyinventroy selectSafetyinventroyById(@Param(value = "id") Long id, @Param(value = "siteCode") String siteCode);

  void insertSafetyinventroy(Safetyinventroy safetyinventroy);

  void updateSafetyinventroy(Safetyinventroy safetyinventroy);

  void deleteSafetyinventroyById(@Param(value = "id") Long id, @Param(value = "siteCode") String siteCode);

  /**
   * 
   * <strong>Title : selectSafetyinventroy<br></strong>
   * <strong>Description : </strong>查询安全库存<br> 
   * <strong>Create on : 2016-3-7 下午01:23:02<br></strong>
   * <p>
   * @param siteCode
   * @param materialCode
   * @param warehouseCode
   * @param storageLocationCode
   * @return
   * Safetyinventroy
   * @throws 
   * @author zhaoxin01<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人    |    修改日期    |    修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  Safetyinventroy selectSafetyinventroy(@Param("siteCode") String siteCode, @Param("materialCode") String materialCode,
      @Param("warehouseCode") String warehouseCode, @Param("storageLocationCode") String storageLocationCode);

  /**
   * 
   * <strong>Title : getSafetyInventory<br></strong>
   * <strong>Description : </strong>根据物料、仓库、库位查找安全库存<br> 
   * <strong>Create on : 2016年9月18日 下午2:10:38<br></strong>
   * <p>
   * @param condition
   * @return
   * Safetyinventroy
   * @throws 
   * @author dapeng.li<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  Safetyinventroy getSafetyInventory(SafetyinventroyCondition condition);
}
